<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>for</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
</head>
<body>
<div id="div">
    <ul>
        <li v-for="a in arr">{{a}}</li>
        <!--<li v-for="(a, index) in arr">{{index + "::" + a}}</li>-->
    </ul>

    <ul>
        <li v-for="b in user">{{b}}</li>
        <!--<li v-for="(value,key) in user">{{key + "::" + value}}</li>-->
    </ul>

    <table>
        <tr>
            <th>id</th>
            <td>姓名</td>
            <td>年龄</td>
            <td>性别</td>
        </tr>
        <tr v-for="user in users">
            <td>{{user.id}}</td>
            <td>{{user.name}}</td>
            <td>{{user.age}}</td>
            <td>{{user.sex}}</td>
        </tr>
    </table>
</div>
</body>
<script>
    new Vue({
        el: "#div",
        data: {
            arr: ["杨添龙", "侯佳伟", "王宸"],

            user: {
                id: 1,
                name: "小杨",
                age: 22,
                sex: "男"
            },
            users: [
                {
                    id: 1,
                    name: "小姚",
                    age: 23,
                    sex: "女"
                },
                {
                    id: 2,
                    name: "路遥",
                    age: 22,
                    sex: "女"
                },
                {
                    id: 3,
                    name: "佳伟",
                    age: 22,
                    sex: "男"
                }
            ]
        }
    });
</script>
</html>